package com.example.service.impl;

import com.example.pojo.GsType;
import com.example.mapper.GsTypeMapper;
import com.example.service.IGsTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.vo.ResultVo;
import com.example.vo.respvo.Option;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 物品分类表 服务实现类
 * </p>
 *
 * @author wsl
 * @since 2022-04-11
 */
@Service
public class GsTypeServiceImpl extends ServiceImpl<GsTypeMapper, GsType> implements IGsTypeService {

    @Override
    public ResultVo getGsTypeList() {
        List<GsType> gsTypes = baseMapper.selectList(null);
        return ResultVo.response(gsTypes);
    }

    @Override
    public ResultVo getGsTypeOptions() {
        List<Option> gsTypeOptions = baseMapper.selectGsTypeOptions(-1);
        return ResultVo.response(gsTypeOptions);
    }

}
